package ming.model.type;

import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.commons.lang.StringUtils;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

 
@SuppressWarnings("serial")
@Entity
@Table(name = "T_BUSSINESS_LICENSE", schema = "")
@DynamicInsert(true)
@DynamicUpdate(true)
public class License implements java.io.Serializable {

	private String path;// 此属性不存数据库，虚拟属性
	// Fields
	
	private String id;
	private String name;
	private String enName;
	private String type;
	private String url;
	private String applyType;
	private String code;
	private String icon;
	private String style1;
	private String style2;
	private int sort;
	private int state;
	private String createtime;
	private int waitTime;
	private String applyNotice;
	private String bussinessNotice;
	
	@Id
	@Column(name = "ID", unique = true, nullable = false, length = 36)
	public String getId() {
		if (!StringUtils.isBlank(this.id)) {
			return this.id;
		}
		return UUID.randomUUID().toString();
	}

	public void setId(String id) {
		this.id = id;
	}
	
	

	@Transient
	public String getPath() {
		return path;
	}
	
	@Column(name = "name", length = 100)
	public String getName() {
		return name;
	}

	@Column(name = "code", length = 100)
	public String getCode() {
		return code;
	}

	@Column(name = "state")
	public int getState() {
		return state;
	}

	@Column(name = "createtime", length = 100)
	public String getCreatetime() {
		return createtime;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void setState(int state) {
		this.state = state;
	}

	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}

	public void setPath(String path) {
		this.path = path;
	}

	@Column(name = "enName", length = 100)
	public String getEnName() {
		return enName;
	}

	public void setEnName(String enName) {
		this.enName = enName;
	}

	@Column(name = "type", length = 100)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Column(name = "icon", length = 100)
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	@Column(name = "sort")
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	@Column(name = "url", length = 100)
	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "style1", length = 100)
	public String getStyle1() {
		return style1;
	}

	public void setStyle1(String style1) {
		this.style1 = style1;
	}

	@Column(name = "style2", length = 100)
	public String getStyle2() {
		return style2;
	}

	public void setStyle2(String style2) {
		this.style2 = style2;
	}

	@Column(name = "waitTime")
	public int getWaitTime() {
		return waitTime;
	}

	public void setWaitTime(int waitTime) {
		this.waitTime = waitTime;
	}

	@Column(name = "applyType", length = 100)
	public String getApplyType() {
		return applyType;
	}

	public void setApplyType(String applyType) {
		this.applyType = applyType;
	}

	@Column(name = "applyNotice", length = 65535)
	public String getApplyNotice() {
		return applyNotice;
	}

	public void setApplyNotice(String applyNotice) {
		this.applyNotice = applyNotice;
	}

	@Column(name = "bussinessNotice", length = 65535)
	public String getBussinessNotice() {
		return bussinessNotice;
	}

	public void setBussinessNotice(String bussinessNotice) {
		this.bussinessNotice = bussinessNotice;
	}

	
	
	

}